import { persistor, PERSIST_KEY } from "../store";
import { removeToken } from "./user-token";

export function clearPersistor() {
  // 清除持久化数据
  persistor.purge();
  localStorage.removeItem(`persist:${PERSIST_KEY}`);
  removeToken();
}

export function genFontSize(level: number) {
  switch (level) {
    case 1:
      return "36px";
    case 2:
      return "30px";
    case 3:
      return "24px";
    case 4:
      return "18px";
    default:
      return "16px";
  }
}
